// 选中or悬浮状态下的颜色配置
// const selectAndHoverAreaOpt = {
//   areaColor: '#148df2',
//   borderColor: '#7ab3f9', // 边界颜色
//   shadowColor: '#7ab3f9', // 阴影，就是hover之后的高亮颜色
//   shadowBlur: 10,
//   shadowOffsetX: 0,
//   shadowOffsetY: 0,
//   global: false
// }

export const coordinateList = [
  'A：[113.112414 , 23.019643]',
  'B：[113.145577, 23.031562]',
  'C：[113.281826,22.75851]',
  'D：[112.899414,23.16504]',
  'E：[112.882123,22.893855]'
]

export const initOptions = {
  title: {
    text: '',
    x: '40',
    y: '10',
    textStyle: {
      color: '#b7eeff',
      fontSize: 40,
      fontWeight: '1000'
    }
  },
  tooltip: {
    show: false
  },
  visualMap: {
    min: 0,
    max: 0,
    realtime: false,
    calculable: true,
    inRange: { //不填则有颜色
      // color: ['#FAFDFF', '#E1F3FC', '#B2E0F8', '#B2E0F8', '#00B2ED']
    },
    show: false
  },
  geo: {
    type: 'map',
    aspectScale: 1.1, //长宽比
    zoom: 1.1,
    roam: false,
    regions: [{
      name: '三水区',
      itemStyle: {
        // 隐藏地图
        normal: {
          opacity: 0 // 为 0 时不绘制该图形
        }
      },
      label: {
        show: false // 隐藏文字
      }
    }]
  },
  series: [{
      type: 'map',
      roam: false,
      label: {
        normal: {
          show: true
        },
        emphasis: {
          show: true
        }
      },
      colorBy: 'data',
      itemStyle: {
        normal: {
          borderColor: '#7eb8ff',
          borderWidth: 1,
          fontWeight: 500
        }
      },
      // 鼠标hover上去的时候的区域样式
      emphasis: {
        show: false,
        label: {
          // 隐藏勾选后的地图文案回显
          show: false
        },
      },
      // 选中的颜色配置
      select: {
        show: false,
        label: {
          // 隐藏勾选后的地图文案回显
          show: false
        },
      },
      zoom: 1.1,
      aspectScale: 1.1
    },
    {
      name: '666',
      type: 'scatter',
      coordinateSystem: 'geo',
      symbol: 'pin',
      symbolSize: [50, 50],
      label: {
        normal: {
          show: true,
          textStyle: {
            color: '#fff',
            fontSize: 10,
          },
          formatter(value) {
            let num = ''
            switch (value.name) {
              case "顺德区":
                num = 'D'
                break;
              case "三水区":
                num = 'A'
                break;
              case "南海区":
                num = 'B'
                break;
              case "禅城区":
                num = 'C'
                break;
              case "高明区":
                num = 'D'
                break;
            }
            return num;
          },
        },
      },
      itemStyle: {
        normal: {
          color: function () {
            return 'red';
          },
        },
      },
      data: [{
          name: '禅城区',
          value: [113.112414, 23.019643]
        },
        {
          name: '南海区',
          value: [113.145577, 23.031562]
        },
        {
          name: '顺德区',
          value: [113.281826, 22.75851]
        },
        {
          name: '三水区',
          value: [112.899414, 23.16504]
        },
        {
          name: '高明区',
          value: [112.882123, 22.893855]
        }
      ],
      showEffectOn: 'render',
      rippleEffect: {
        brushType: 'stroke',
      },
      hoverAnimation: true,
      zlevel: 1,
    },
  ]
}